﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FanaticRock.Core.DI
{
    public class ClassDIInfo
    {
        public Type ClassType { get; set; }

        public InjectMeAttribute.LifeTimeEnum LiftTimeType { get; set; }

        public ClassDIInfo(Type classType)
        {
            ClassType = classType;
        }

        public override string ToString()
        {
            return $"ClassDIInfo classType {ClassType}";
        }

    }
    public class ClassInterfaceDIPair : ClassDIInfo
    {
        public Type InterfaceType { get; set; }

        public ClassInterfaceDIPair(Type classType, Type interfaceType):base(classType)
        {
            InterfaceType = interfaceType;
        }

        public override string ToString()
        {
            return $"ClassInterfaceDIPair classType {ClassType} interfaceType {InterfaceType}";
        }
    }

    public class ClassInterfaceDIPair<TClass, TInterface> : ClassInterfaceDIPair
    {
        public ClassInterfaceDIPair() : base(typeof(TClass), typeof(TInterface))
        {

        }
    }

}
